﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace DbSync
{
    /// <summary>
    /// Interaction logic for ConfirmationWindow.xaml
    /// </summary>
    /// 


    public partial class ConfirmationWindow : Window
    {
        public static MessageBoxResult isConfirm { get; set; }

        public ConfirmationWindow(String Title, String Message)
        {
            InitializeComponent();
            isConfirm = MessageBoxResult.No;
            ResizeMode = ResizeMode.NoResize;
            ConfirmMessage.Content = Message;
            this.Title = Title;
        }

        private void ConfirmButton_Click(object sender, RoutedEventArgs e)
        {
            isConfirm = MessageBoxResult.Yes;
            this.Close();          
        }

        private void CancelButton_Click(object sender, RoutedEventArgs e)
        {
            isConfirm = MessageBoxResult.No;
            this.Close();
        }

        public static MessageBoxResult IsConfirm()
        {
            return isConfirm;
        }
    }
}
